home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / amigaoscd / amigapluscd / AP-Website / forum / wbboard / print.php < prev    next >
Text File  |  2001-11-16  |  2KB  |  41 lines

  1. <? 
  2. require("_functions.php");
  3.  
  4. $thread_info = $db_zugriff->query_first("SELECT * FROM bb".$n."_threads WHERE threadid = '$threadid'");
  5. if($boardid != $thread_info[boardparentid]) { 
  6.     eval("dooutput(\"".gettemplate("hack_error")."\");");
  7.     exit;
  8. }
  9. if($imageurl) $imageurl = "<img src=\"$imageurl\">";
  10.  
  11. $anzahl = $thread_info[replies]+1;
  12. if(!$page) $page=1;
  13. $post_result = $db_zugriff->query("SELECT bb".$n."_posts.*, bb".$n."_user_table.* FROM bb".$n."_posts LEFT JOIN bb".$n."_user_table USING (userid) WHERE bb".$n."_posts.threadparentid='$threadid' ORDER by bb".$n."_posts.posttime ".ifelse($postorder,"DESC","ASC")." LIMIT ".($eproseite*($page-1)).",".($eproseite));
  14. $pages=ceil($anzahl/$eproseite);
  15.  
  16. while($posts = $db_zugriff->fetch_array($post_result)){
  17.         
  18.     unset($signature);
  19.     if($posts[posticon]) $posticon = "<img src=\"".$posts[posticon]."\">";
  20.     else $posticon = " ";
  21.     if($posts[posttopic]) $posttopic = prepare_topic($posts[posttopic]);
  22.     else $posttopic = "";
  23.     $post = editPost($posts[message],$posts[disable_smilies]);
  24.     if($posts[signatur] && $posts[signature] && !$hide_signature) {
  25.         $signatur = editSignatur($posts[signatur],$posts[disable_smilies]);
  26.         eval ("\$signature = \"".gettemplate("thread_signature")."\";");
  27.     }
  28.     $posttime = formatdate($posts[posttime],$longdateformat);
  29.         
  30.     eval ("\$print_postbit .= \"".gettemplate("print_postbit")."\";");
  31. }
  32. $db_zugriff->free_result($post_result);
  33.  
  34. if($imageurl) $image = "<img src=\"$imageurl\">";                        
  35. $threadname = getThreadname($threadid);
  36. $boardname = getBoardname($boardid);
  37.  
  38. eval("dooutput(\"".gettemplate("print")."\");");
  39. ?>
  40.             
  41.